package cn.mybatis.seeumt.mapper;

import cn.mybatis.seeumt.entity.UserInfo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Arrays;
import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class UserInfoMapperTest01 {


    @Autowired
    private UserInfoMapper userInfoMapper;

    @Test
    public void select() {
        QueryWrapper<UserInfo> queryWrapper = new QueryWrapper<>();
//        queryWrapper.like("name", "雨").eq("gender", 0);
        queryWrapper.like("name", "雨").lt("register_mode", "5").orderByDesc("register_mode");
        List<UserInfo> userInfos = userInfoMapper.selectList(queryWrapper);
        userInfos.forEach(System.out::println);
    }
}
